<template>
	<view>
		<view class="top"></view>

		<view class="fu_add">
			<text>收货人</text>
			<view class="ipt">
				<input v-model="name" class="ipt_name" placeholder="请输入姓名" type="text" value="" />
			</view>
		</view>

		<view class="fu_add">
			<text>联系电话</text>
			<view class="ipt">
				<input v-model="phone" class="ipt_name" placeholder="请输入联系电话" type="text" value="" />
			</view>
		</view>

		<view class="fu_add">
			<text>选择学校</text>
			<view class="ipt" @click="goschool">
				<view class="ipt_name">
					西南财经学校西南区
				</view>
				<image src="../../static/users/right.png" mode=""></image>
			</view>
		</view>

		<view class="fu_add">
			<text>收货地址</text>
			<view class="area">
				<textarea v-model="address" value="" placeholder="请输入收获地址" />
			</view>
		</view>

		<view class="default">
          设为默认地址
		  <u-switch class="switch" inactive-color="#8A92AC" active-color="#000" size="36" v-model="checked"></u-switch>
		</view>
       
	   
	   <view class="delete" @click="tan">
	   	删除收货地址
	   </view>
	   <view class="bottom">
	   	
	   </view>
	   
	   <view class="di_c">
	   	<view class="us">
	   		保存
	   	</view>
	   
	   	<view class="xia_x">
	   
	   	</view>
	   </view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				checked: false,
				name:"",
				phone:"",
				address:""
			}
		},
		methods: {
            tan(){
				uni.showModal({
					content:"确认删除该地址",
					success:res=>{
						console.log(res);
					}
				})
			},
			goschool(){
				uni.navigateTo({
					url:"../school/school"
				})
			}
		},
		onLoad(e){
			console.log(e);
			if(e.id){
				this.name="王二狗"
				this.phone=15282094569
				this.address="四川省成都市双流区机场街道百草路125号新丽花园二期"
				this.checked=true
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F2F4FA;
	}

	.top {
		width: 750rpx;
		height: 20rpx;
	}

	.fu_add {
		margin: 50rpx 0 0 30rpx;
		height: 145rpx;
		width: 690rpx;
		position: relative;
		text {
			position: absolute;
			left: 12rpx;
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #181818;
		}

		.area {
			position: absolute;
			top: 60rpx;
			width: 690rpx;
			width: 690rpx;
			height: 160rpx;
			background: #FFFFFF;
			border-radius: 44rpx;

			textarea {
				margin: 25rpx 0 0 43rpx;
				width: 610rpx;
				height: 100rpx;
			}
		}

		.ipt {
			position: absolute;
			top: 60rpx;
			width: 690rpx;
			height: 88rpx;
			background: #FFFFFF;
			border-radius: 44rpx;

			.ipt_name {
				margin-left: 40rpx;
				width: 600rpx;
				height: 88rpx;
				line-height: 88rpx;
				// font-size: 26rpx;
				// font-family: PingFang SC;
				// font-weight: 400;
				// color: #181818;
			}

			image {
				position: absolute;
				right: 35rpx;
				top: 35rpx;
				width: 10rpx;
				height: 18rpx;

			}
		}
	}

	.default {
		margin: 100rpx 0 0 30rpx;
		width: 690rpx;
		height: 108rpx;
		background: #FFFFFF;
		border-radius: 40rpx;
		line-height: 108rpx;
		padding-left: 41rpx;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #181818;
		position: relative;
		.switch{
			position: absolute;
			right: 40rpx;
			top: 36rpx;
		}
	}
	
	.delete{
		margin: 51rpx 0 0 50rpx;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #F48F5B;
	}
	
	.di_c {
		position: fixed;
		bottom: 0;
		width: 750rpx;
		height: 209rpx;
		background-color: #fff;
	
		.us {
			margin: 40rpx auto;
			width: 610rpx;
			height: 100rpx;
			background: #181818;
			box-shadow: 0px 10rpx 40rpx 0px rgba(24, 24, 24, 0.26);
			border-radius: 50rpx;
			text-align: center;
			line-height: 100rpx;
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
		}
	
		.xia_x {
			margin: 0rpx 0 0 241rpx;
			width: 268rpx;
			height: 10rpx;
			background-color: #000;
		}
	}
	
	.bottom{
		width: 750rpx;
		height: 500rpx;
	}
</style>
